package cn.lgwen.spark.ml.learning.kaggle;

import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;

/**
 * 2021/4/14
 *
 * @author aven@didiglobal.com
 */
public class ChineseMNIST {

    public static void main(String[] args) {
        SparkSession spark = SparkSession
                .builder().master("local[*]")
                .appName("image")
                .getOrCreate();

        Dataset<Row> imagesDF = spark.read().format("image").option("dropInvalid", true)
                .load("data/mllib/images/origin/kittens");
        imagesDF.select("image.origin", "image.width", "image.height").show(false);
    }
}
